//@ sourceURL=ReceiveRecordForm.js
ReceiveRecordForm = Ext.extend(Ext.Window,
{
    constructor : function(a) {
        Ext.applyIf(this, a);
        this.initUIComponents();
        ReceiveRecordForm.superclass.constructor.call(this, {
            layout : "fit",
            id : this.inputFormName,
            items : yearGridFormPanel,
            modal : true,
            bodyStyle : "padding:2px;",
            buttonAlign : "center",
            buttons : yearGridFormButtons,
            title : "领用记录信息",
            iconCls : "menu-flowWait",
            width : 620,
            height : 450
        });
    },
    //初始化数据
    initUIComponents : function() {
        createyeargridform({
            operation:this,
            form:{
                saveUrl: __ctxPath+"/labourproducts/saveReceiveRecord.do",
                items:[
                {
                    id : "receiveRecord.id",
                    name : "receiveRecord.id",
                    xtype : "hidden",
                    value : this.id == null ? "": this.id
                }, {
                	id : "receiveRecord.years",
                    name : "receiveRecord.years",
                    xtype : "hidden",
                  
                    value : this.years == null ? "" : this.years
                },{
				layout : "column",
				//      border:false,
				bodyStyle : "padding:5px;",
				items : [
						{
							layout : "form",
							columnWidth : .5,
							border : false,
							//                        True表示为显示出面板body元素的边框，false则隐藏
							defaultType : "textfield",
							items : [ {
								fieldLabel : '领用人'
										+ '<font color=red>*</font>',
								id : "receiveRecord.receiverName",
								name : "receiveRecord.receiverName",
								maxLength : 80,
								width : 146,
								allowBlank : false,
								blankText : "领用人不能为空！"
							} ]
						},{
							layout : "form",
							columnWidth : .5,
							border : false,
							items : [ {
								xtype : "textfield",
								fieldLabel : '领用物品',
								name : "receiveRecord.receiveGoods",
								width : 146,
								allowBlank : true

							} ]
						
						},{
							layout : "form",
							columnWidth : .5,
							border : false,
							items : [ {
								xtype : "textfield",
								fieldLabel : '所属机构',
								name : "receiveRecord.institution",
								width : 146,
								allowBlank : true

							} ]
						
						},{
							layout : "form",
							border : false,
							columnWidth : .5,
							items : [ {
								xtype : "datefield",
								fieldLabel : '领用时间'
										+ '<font color=red>*</font>',
								id : "receiveRecord.receiveDate",
								format : "y-m-d",
								name : "receiveRecord.receiveDate",
								width : 146,
								allowBlank : false,
								blankText : "领用时间不能为空！"
							    
							} ]
						},{
							layout : "form",
							columnWidth : .5,
							border : false,
							//                        True表示为显示出面板body元素的边框，false则隐藏
							defaultType : "textfield",
							items : [ {
								fieldLabel : '领用部门'
										+ '<font color=red>*</font>',
								id : "receiveRecord.department",
								name : "receiveRecord.department",
								maxLength : 80,
								width : 146,
								allowBlank : false,
								blankText : "领用部门不能为空！"
							} ]
						},{
							layout : "form",
							columnWidth : .5,
							border : false,
							defaultType : "textfield",
							items : [ {
								fieldLabel : '使用者'
									+ '<font color=red>*</font>',
							id : "receiveRecord.user",
							name : "receiveRecord.user",
							maxLength : 80,
							width : 146,
							allowBlank : false,
							blankText : "使用者不能为空!"
							} ]
							} ,{
							layout : "form",
							columnWidth : .5,
							border : false,
							//                        True表示为显示出面板body元素的边框，false则隐藏
							defaultType : "textfield",
							items : [ {
								fieldLabel : "领用数量",
								name : "receiveRecord.samount",
								maxLength : 80,
								width : 146,
								allowBlank : true
							} ]
						},{
							layout : "form",
							columnWidth : .5,
							border : false,
							items : [ {
								xtype : "textfield",
								fieldLabel : '单位',
								name : "receiveRecord.unit",
								width : 146,
								allowBlank : true
							} ]
						},{
							layout : "form",
							columnWidth : .5,
							border : false,
							//                        True表示为显示出面板body元素的边框，false则隐藏
							defaultType : "textfield",
							items : [ {
								fieldLabel : "实际发放数量",
								id : "receiveRecord.actualAmount",
								name : "receiveRecord.actualAmount",
								maxLength : 80,
								width : 146,
								allowBlank : true

							} ]
						},
					    {

						columnWidth : 1.,//第一列 
						layout : "form",
						 border : false,
						//bodyStyle : "padding:5px;",
						items : [ {
							xtype : "textarea",
							fieldLabel : '备注',
							name : 'receiveRecord.remark',
							width : 448
						} ]
						
					} ]
			}]
            },
            loadData:{
                getUrl:__ctxPath +"/labourproducts/getReceiveRecord.do",
                preName : "receiveRecord"
            },
            isShow : this.isShow
        });
    }
});
